package cc.autoapi.pucong.auto.flow.core.flow.execNode.task.system;


import cc.autoapi.pucong.auto.flow.core.flow.execNode.entity.node.ExecNode;
import cc.autoapi.pucong.auto.flow.core.flow.execNode.entity.node.NodeParamIn;
import cc.autoapi.pucong.auto.flow.core.flow.execNode.entity.node.NodeParamOut;
import cc.autoapi.pucong.auto.flow.core.flow.execNode.entity.node.TaskNode;
import cc.autoapi.pucong.auto.flow.core.flow.execNode.task.AbstractTask;

import java.util.ArrayList;
import java.util.List;

public class LogicTask extends AbstractTask {

    private List<NodeParamIn> paramsIns;
    private List<NodeParamOut> paramsOuts;
    private String nextNodeName;

    public LogicTask() {
        paramsIns = new ArrayList<>();

        paramsOuts = new ArrayList<>();
    }

    @Override
    public void run() {
        ExecNode execNode = getExecNode();
        // 执行逻辑表达式

        // 设置输出信息
        
    }

    @Override
    public List<TaskNode> fitterNextPublishNode(List<TaskNode> nextNodeList) {
        return new ArrayList<>();
    }

    @Override
    public String getTaskName() {
        return "逻辑编排节点";
    }

    @Override
    public String getTaskDesc() {
        return "通过设置逻辑节点，生成逻辑编排规则；";
    }

    @Override
    public String getTaskSvgIcon() {
        return "<svg t=\"1733044572662\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"6368\" width=\"32\" height=\"32\"><path d=\"M0 521.6c0 116.8 107.2 211.2 238.4 211.2s238.4-94.4 238.4-211.2-107.2-211.2-238.4-211.2S0 404.8 0 521.6z\" fill=\"#8CC152\" p-id=\"6369\"></path><path d=\"M212.8 324.8c0 108.8 123.2 195.2 275.2 195.2S761.6 432 761.6 324.8 638.4 128 488 128s-275.2 88-275.2 196.8z\" fill=\"#8CC152\" p-id=\"6370\"></path><path d=\"M337.6 524.8c0 142.4 153.6 257.6 342.4 257.6S1024 667.2 1024 524.8s-153.6-257.6-342.4-257.6S337.6 384 337.6 524.8z\" fill=\"#8CC152\" p-id=\"6371\"></path><path d=\"M123.2 662.4c0 128 128 233.6 286.4 233.6s286.4-104 286.4-233.6-128-233.6-286.4-233.6S123.2 534.4 123.2 662.4z\" fill=\"#8CC152\" p-id=\"6372\"></path><path d=\"M460.8 710.4c0 68.8 94.4 123.2 211.2 123.2s211.2-56 211.2-123.2c0-68.8-94.4-123.2-211.2-123.2s-211.2 54.4-211.2 123.2z\" fill=\"#8CC152\" p-id=\"6373\"></path><path d=\"M294.4 398.4c0 38.4 32 70.4 70.4 70.4s70.4-32 70.4-70.4-32-70.4-70.4-70.4-70.4 32-70.4 70.4z m235.2 276.8c0 44.8 35.2 80 80 80s80-35.2 80-80-35.2-80-80-80-80 36.8-80 80z m115.2-276.8c0 28.8 24 52.8 52.8 52.8s52.8-24 52.8-52.8c0-28.8-24-52.8-52.8-52.8s-52.8 22.4-52.8 52.8zM232 675.2c0 25.6 20.8 46.4 46.4 46.4s46.4-20.8 46.4-46.4-20.8-46.4-46.4-46.4-46.4 20.8-46.4 46.4z\" fill=\"#FFFFFF\" p-id=\"6374\"></path><path d=\"M428.8 390.4h228.8v16H428.8v-16z m-105.6 278.4h228.8v16H323.2v-16z m291.2-16l54.4-222.4 16 3.2L630.4 656l-16-3.2z m-337.6 0l54.4-222.4 16 3.2L292.8 656l-16-3.2z m105.6-209.6l11.2-9.6 216 251.2-11.2 9.6-216-251.2z\" fill=\"#FFFFFF\" p-id=\"6375\"></path></svg>";
    }

    @Override
    public List<NodeParamIn> getPropertyParamsIns() {
        return paramsIns;
    }

    @Override
    public List<NodeParamOut> getPropertyParamsOuts() {
        return paramsOuts;
    }
}
